package com.lb.design.pattern.singleton.lazy;

/**
 * @author lb
 * @Title: LazySingleton
 * @Description: 懒汉单例
 * @date 2019/03/11  20:23
 */
public class LazySingleton {
    private static LazySingleton lazySingleton  = null;
    private LazySingleton(){

    }
    public synchronized static LazySingleton getInstance(){
        if (lazySingleton == null){
            lazySingleton = new LazySingleton();
        }
        return lazySingleton;
    }
}
